<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@include file="../../common/taglibs.jsp"%>
<%@include file="../../common/_head.jsp"%>
<html>
<head>
    <title>落地页列表</title>
</head>
<body pname="<%=basePath%>">
<div class="layui-fluid">
    <div class="layui-row layui-col-space15">
        <div class="layui-col-md12">
            <div class="layui-col-md12">
                <div class="layui-card">
                    <table class="layui-hide" id="data-table" lay-filter="data-table"></table>

                    <script type="text/html" id="data-table-toolbar">
                        <div class="layui">
                            <div class="layui-condition">
                                <label>状态：</label>
                                <div class="layui-inline" style="width: 80px;">
                                    <select id="status">
                                        <option value="">全部</option>
                                        <option value="0">启用</option>
                                        <option value="1">禁用</option>
                                    </select>
                                </div>
                            </div>
                            <div class="layui-condition">
                                <button type="button" class="layui-btn" id="search" lay-event="search">
                                    <i class="layui-icon">&#xe615;</i>搜索
                                </button>
                            </div>

                            <div class="layui-btn-container" style="float: right;">
                                <c:forEach items="${userPermissions}" var="permission">
                                    <c:if test="${permission eq '/channelConfig/add'}">
                                        <button class="layui-btn layui-btn-sm" lay-event="add">新增</button>
                                    </c:if>
                                </c:forEach>
                            </div>
                        </div>
                    </script>

                    <script type="text/html" id="data-table-bar">
                        <c:forEach items="${userPermissions}" var="permission">
                            <c:if test="${permission eq '/channelConfig/updateStatus'}">
                                <a class="layui-btn layui-btn-xs" lay-event="updateStatus">
                                    {{# if(d.status == 0){ }}
                                        禁用
                                    {{# }else{ }}
                                        启用
                                    {{# } }}
                                </a>
                            </c:if>
                            <c:if test="${permission eq '/channelConfig/edit'}">
                                <a class="layui-btn layui-btn-xs" lay-event="edit">编辑</a>
                            </c:if>
                        </c:forEach>
                    </script>

                    <script type="text/html" id="imgTpl">
                        <img src="{{ ossDomain }}/{{d.img }}" style="width: 100%;">
                    </script>
                    <script type="text/html" id="statusTpl">
                        {{# if(d.status == 0){ }}
                            启用
                        {{# }else{ }}
                            禁用
                        {{# } }}
                    </script>
                </div>
            </div>
        </div>
    </div>
</div>

<script src="<%=path%>/js/channelmanage/config/list.js?v=1.1.0"></script>
</body>
</html>
